1. Field of the Invention
This invention relates to digital cameras, and more particularly to a digital camera, for example, controllable by a program and having an internal memory for recording photographed image data.
2. Description of the Prior Art
In a conventional digital camera of this kind, both of an overall-operation control program and photographed image data are recorded into a common internal memory. Where an additional program is to be fetched from an outside, the additional program is also recorded into the same internal memory.
However, if the recording and erasing photographed image data are repeatedly made, vacant areas are sporadically formed over the internal memory. Due to this, if one continuous vacant area has a size not reaching that of an additional program, the photographed image data has to be erased despite the total size of the vacant areas are greater than the size of the additional program. That is, the program is executed responsive to a count value of a program counter that is incremented by a predetermined clock. Accordingly, if the program is recorded in a scattered form on the internal memory, the program is impossible to execute. Thus, there has been a necessity of a continuous sufficient vacant area.
Therefore, it is the primary object of this invention to provide a digital still camera which is capable of appropriately fetching an additional program into an internal memory by a simple operation.
This invention is a digital camera controllable by a program and having an internal memory for recording photographed image data, comprising: an inputting means for receiving an additional program; a first detecting means for detecting a first size of the additional program; a first detecting means for detecting a second size of a maximum vacant area formed in the internal memory; a comparing means for comparing the first size with the second size; an extending means for extending the maximum vacant area depending upon a first result of comparison by the first comparing means; and a writing means for writing the additional program to the maximum vacant area.
When an additional program is inputted, the first detecting means detects a first size of the additional program, and the second detecting means detects a second size of a maximum vacant area formed in the internal memory. The first size and the second size are compared by the first comparing means so that the extending means extends the maximum vacant area depending on the comparing result. Then, the writing means writes the additional program to the maximum vacant area.
In one aspect of this invention, the extending means detects another vacant area formed in the internal memory when the first size is greater than the second size to move part of the photographed image data to the other vacant area. Since the photographed image data is recorded over a plurality of clusters, the photographed image data is moved for each cluster. The photographed image data to be moved is predetermined clusters of the photographed image data following the maximum vacant area.
In another aspect of this invention, a fourth detecting means detects a total size of the vacant area formed in the internal memory. The detected total size is compared with the first size so that a predetermined warning is generated depending upon the comparing result. That is, a generating means generates a predetermined warning when the total size is smaller than the first size.
According to this invention, if a first size of a maximum vacant area is smaller than a second size of an additional program, the extending means moves photographed image data to thereby extend the maximum vacant area. It is therefore possible to appropriately fetch an additional program into an internal memory without requiring troublesome operations.
The above described objects and other objects, features, aspects and advantages of the present invention will become more apparent from the following detailed description of the present invention when taken in conjunction with the accompanying drawings.